home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / procps < prev    next >
Encoding:
Text File  |  2010-11-16  |  915 b   |  50 lines

  1. # Completions for tools included in procps and related
  2.  
  3. # killall(1) (Linux and FreeBSD) and pkill(1) completion.
  4. #
  5. [[ $UNAME == Linux || $UNAME == FreeBSD ]] || have pkill &&
  6. _killall()
  7. {
  8.     local cur
  9.  
  10.     COMPREPLY=()
  11.     _get_comp_words_by_ref cur
  12.  
  13.     if [[ $COMP_CWORD -eq 1 && "$cur" == -* ]]; then
  14.         _signals
  15.     else
  16.         _pnames
  17.     fi
  18.  
  19.     return 0
  20. }
  21. [[ $UNAME == Linux || $UNAME == FreeBSD ]] && complete -F _killall killall
  22. have pkill && complete -F _killall pkill
  23.  
  24. # pgrep(1) completion.
  25. #
  26. [ $UNAME = Linux ] || have pgrep &&
  27. _pgrep()
  28. {
  29.     local cur
  30.  
  31.     COMPREPLY=()
  32.     _get_comp_words_by_ref cur
  33.  
  34.     _pnames
  35.  
  36.     return 0
  37. }
  38. have pgrep && complete -F _pgrep pgrep
  39.  
  40. # Linux pidof(8) completion.
  41. [ $UNAME = Linux ] && complete -F _pgrep pidof
  42.  
  43. # Local variables:
  44. # mode: shell-script
  45. # sh-basic-offset: 4
  46. # sh-indent-comment: t
  47. # indent-tabs-mode: nil
  48. # End:
  49. # ex: ts=4 sw=4 et filetype=sh
  50.